package com.gemframework.modules.extent;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gemframework.model.common.BaseResultData;
import com.gemframework.service.SubjectService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/Subject")
public class SubjectAPI {

    @Resource
    private SubjectService subjectService;

    //根据id查询科目表信息
    @GetMapping("/selSubjectById")
    public BaseResultData selSubjectById(Integer id){
        return BaseResultData.SUCCESS(subjectService.getById(id));
    }

    //科目信息表类型集合查询
    @GetMapping("/list")
    public BaseResultData list(){
        return  BaseResultData.SUCCESS(subjectService.list());
    }
}
